package org.rcloud.io;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;



@SpringBootApplication
@MapperScan("org.rcloud.io.mapper")//将项目中对应的mapper类的路径加进来就可以了
@Configuration
public class WechatApiApplication extends WebMvcConfigurerAdapter {
	public static void main(String[] args) {

		SpringApplication.run(WechatApiApplication.class, args);

	}

		@Autowired
		private LJQHandlerInterceptor ljqHandlerInterceptor;

	@Override
	public void addInterceptors(InterceptorRegistry registry) {
		registry.addInterceptor(ljqHandlerInterceptor).addPathPatterns("*");
	}
}

